package com.atguigu.g_integer;

public class Demo {
    public static void main(String[] args) {
        //自动装箱
        Integer num = 10;


        //自动拆箱
        int i = num;


        Integer i1 = 10; //Integer i1 = Integer.valueOf(10);
        Integer i2 = 20; //Integer i2 = Integer.valueOf(20);

        Integer sum = i1 + i2; //Integer sum = Integer.valueOf(i1.intValue() + i2.intValue());
        System.out.println("sum = " + sum);
    }
}
